//- extends layout

//- block content
//-   h1= title
//-   p= movies
  
html
  head
    title= title
    //- 引入 CSS 样式
    style.
      body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 20px;
        background-color: pink;
      }
      .header {
        text-align: center;
        margin-bottom: 30px;
      }
      .movie-list {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
      }
      .movie-card {
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        width: 200px;
        padding: 15px;
        transition: transform 0.2s;
      }
      .movie-card:hover {
        transform: translateY(-5px);
      }
      .movie-title {
        font-size: 18px;
        font-weight: bold;
        margin: 10px 0;
      }
      .movie-info {
        color: #666;
        font-size: 14px;
      }
  body
    .header
      h1= title

    //- 渲染电影列表
    .movie-list
      each movie in movies
        .movie-card
          .movie-title= movie.title
          .movie-info 评分: #{movie.rating || '暂无'}
          .movie-info 年份: #{movie.year || '未知'}
          .movie-info 导演: #{movie.director || '未知'}
